/*
* Copyright (C) 1997-2001 Id Software, Inc.
* 
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
* 
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE.
* 
* See the GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place - Suite 330, Boston, MA 02111-1307, USA.
*  
*/

// Created on 13.11.2003 by RST.
// $Id: M_Insane.java,v 1.4 2005/11/20 22:18:33 salomo Exp $
using System;
using Defines = Suake2.UI.Defines;
using Suake2.UI.game;
using EntDieAdapter = Suake2.UI.game.EntDieAdapter;
using EntPainAdapter = Suake2.UI.game.EntPainAdapter;
using EntThinkAdapter = Suake2.UI.game.EntThinkAdapter;
using GameAI = Suake2.UI.game.GameAI;
using GameBase = Suake2.UI.game.GameBase;
using GameUtil = Suake2.UI.game.GameUtil;
using edict_t = Suake2.UI.game.edict_t;
using mframe_t = Suake2.UI.game.mframe_t;
using mmove_t = Suake2.UI.game.mmove_t;
using Lib = Suake2.UI.util.Lib;
using Math3D = Suake2.UI.util.Math3D;
namespace Suake2.UI.game.monsters
{
	
	public class M_Insane
	{
		public M_Insane()
		{
			InitBlock();
		}
		public class AnonymousClassEntThinkAdapter:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_fist";
				}
				
			}
			public override bool think(edict_t self)
			{
				GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Insane.sound_fist, 1, Defines.ATTN_IDLE, 0);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter1:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_shake";
				}
				
			}
			public override bool think(edict_t self)
			{
				GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Insane.sound_shake, 1, Defines.ATTN_IDLE, 0);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter2:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_moan";
				}
				
			}
			public override bool think(edict_t self)
			{
				GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Insane.sound_moan, 1, Defines.ATTN_IDLE, 0);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter3:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_scream";
				}
				
			}
			public override bool think(edict_t self)
			{
				GameBase.gi.sound(self, Defines.CHAN_VOICE, jake2.game.monsters.M_Insane.sound_scream[Lib.rand() % 8], 1, Defines.ATTN_IDLE, 0);
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter4:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_cross";
				}
				
			}
			public override bool think(edict_t self)
			{
				if (Lib.random() < 0.8)
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_cross;
				else
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_struggle_cross;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter5:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_walk";
				}
				
			}
			public override bool think(edict_t self)
			{
				if ((self.spawnflags & 16) != 0)
				// Hold Ground?
					if (self.s.frame == jake2.game.monsters.M_Insane.FRAME_cr_pain10)
					{
						self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_down;
						return true;
					}
				if ((self.spawnflags & 4) != 0)
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_crawl;
				else if (Lib.random() <= 0.5)
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_walk_normal;
				else
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_walk_insane;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter6:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_run";
				}
				
			}
			public override bool think(edict_t self)
			{
				if ((self.spawnflags & 16) != 0)
				// Hold Ground?
					if (self.s.frame == jake2.game.monsters.M_Insane.FRAME_cr_pain10)
					{
						self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_down;
						return true;
					}
				if ((self.spawnflags & 4) != 0)
				// Crawling?
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_runcrawl;
				else if (Lib.random() <= 0.5)
				// Else, mix it up
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_run_normal;
				else
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_run_insane;
				return true;
			}
		}
		public class AnonymousClassEntPainAdapter:EntPainAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_pain";
				}
				
			}
			public override void  pain(edict_t self, edict_t other, float kick, int damage)
			{
				int l, r;
				
				//	 if (self.health < (self.max_health / 2))
				//		 self.s.skinnum = 1;
				
				if (GameBase.level.time < self.pain_debounce_time)
					return ;
				
				self.pain_debounce_time = GameBase.level.time + 3;
				
				r = 1 + (Lib.rand() & 1);
				if (self.health < 25)
					l = 25;
				else if (self.health < 50)
					l = 50;
				else if (self.health < 75)
					l = 75;
				else
					l = 100;
				GameBase.gi.sound(self, Defines.CHAN_VOICE, GameBase.gi.soundindex("player/male/pain" + l + "_" + r + ".wav"), 1, Defines.ATTN_IDLE, 0);
				
				if (GameBase.skill.value_Renamed == 3)
					return ; // no pain anims in nightmare
				
				// Don't go into pain frames if crucified.
				if ((self.spawnflags & 8) != 0)
				{
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_struggle_cross;
					return ;
				}
				
				if (((self.s.frame >= jake2.game.monsters.M_Insane.FRAME_crawl1) && (self.s.frame <= jake2.game.monsters.M_Insane.FRAME_crawl9)) || ((self.s.frame >= jake2.game.monsters.M_Insane.FRAME_stand99) && (self.s.frame <= jake2.game.monsters.M_Insane.FRAME_stand160)))
				{
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_crawl_pain;
				}
				else
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_stand_pain;
			}
		}
		public class AnonymousClassEntThinkAdapter7:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_onground";
				}
				
			}
			public override bool think(edict_t self)
			{
				self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_down;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter8:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_checkdown";
				}
				
			}
			public override bool think(edict_t self)
			{
				//			if ( (self.s.frame == FRAME_stand94) || (self.s.frame ==
				// FRAME_stand65) )
				if ((self.spawnflags & 32) != 0)
				// Always stand
					return true;
				if (Lib.random() < 0.3)
					if (Lib.random() < 0.5)
						self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_uptodown;
					else
						self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_jumpdown;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter9:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_checkup";
				}
				
			}
			public override bool think(edict_t self)
			{
				//			If Hold_Ground and Crawl are set
				if ((self.spawnflags & 4) != 0 && (self.spawnflags & 16) != 0)
					return true;
				if (Lib.random() < 0.5)
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_downtoup;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter10:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_stand";
				}
				
			}
			public override bool think(edict_t self)
			{
				if ((self.spawnflags & 8) != 0)
				// If crucified
				{
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_cross;
					self.monsterinfo.aiflags |= Defines.AI_STAND_GROUND;
				}
				// If Hold_Ground and Crawl are set
				else if ((self.spawnflags & 4) != 0 && (self.spawnflags & 16) != 0)
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_down;
				else if (Lib.random() < 0.5)
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_stand_normal;
				else
					self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_stand_insane;
				return true;
			}
		}
		public class AnonymousClassEntThinkAdapter11:EntThinkAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_dead";
				}
				
			}
			public override bool think(edict_t self)
			{
				if ((self.spawnflags & 8) != 0)
				{
					self.flags |= Defines.FL_FLY;
				}
				else
				{
					Math3D.VectorSet(self.mins, - 16, - 16, - 24);
					Math3D.VectorSet(self.maxs, 16, 16, - 8);
					self.movetype = Defines.MOVETYPE_TOSS;
				}
				self.svflags |= Defines.SVF_DEADMONSTER;
				self.nextthink = 0;
				GameBase.gi.linkentity(self);
				return true;
			}
		}
		public class AnonymousClassEntDieAdapter:EntDieAdapter
		{
			override public System.String ID
			{
				get
				{
					return "insane_die";
				}
				
			}
			public override void  die(edict_t self, edict_t inflictor, edict_t attacker, int damage, float[] point)
			{
				int n;
				
				if (self.health <= self.gib_health)
				{
					GameBase.gi.sound(self, Defines.CHAN_VOICE, GameBase.gi.soundindex("misc/udeath.wav"), 1, Defines.ATTN_IDLE, 0);
					for (n = 0; n < 2; n++)
						GameMisc.ThrowGib(self, "models/objects/gibs/bone/tris.md2", damage, Defines.GIB_ORGANIC);
					for (n = 0; n < 4; n++)
						GameMisc.ThrowGib(self, "models/objects/gibs/sm_meat/tris.md2", damage, Defines.GIB_ORGANIC);
					GameMisc.ThrowHead(self, "models/objects/gibs/head2/tris.md2", damage, Defines.GIB_ORGANIC);
					self.deadflag = Defines.DEAD_DEAD;
					return ;
				}
				
				if (self.deadflag == Defines.DEAD_DEAD)
					return ;
				
				GameBase.gi.sound(self, Defines.CHAN_VOICE, GameBase.gi.soundindex("player/male/death" + ((Lib.rand() % 4) + 1) + ".wav"), 1, Defines.ATTN_IDLE, 0);
				
				self.deadflag = Defines.DEAD_DEAD;
				self.takedamage = Defines.DAMAGE_YES;
				
				if ((self.spawnflags & 8) != 0)
				{
					jake2.game.monsters.M_Insane.insane_dead.think(self);
				}
				else
				{
					if (((self.s.frame >= jake2.game.monsters.M_Insane.FRAME_crawl1) && (self.s.frame <= jake2.game.monsters.M_Insane.FRAME_crawl9)) || ((self.s.frame >= jake2.game.monsters.M_Insane.FRAME_stand99) && (self.s.frame <= jake2.game.monsters.M_Insane.FRAME_stand160)))
						self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_crawl_death;
					else
						self.monsterinfo.currentmove = Suake2.UI.game.monsters.M_Insane.insane_move_stand_death;
				}
			}
		}
		private void  InitBlock()
		{
			insane_frames_stand_normal = new mframe_t[]{new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, insane_checkdown)};
			insane_frames_stand_insane = new mframe_t[]{new mframe_t(GameAI.ai_stand, 0, insane_shake), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, null), new mframe_t(GameAI.ai_stand, 0, insane_checkdown)};
			insane_frames_uptodown = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, insane_moan), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 2.7f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 4.1f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 6f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 7.6f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 3.6f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, insane_fist), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, insane_fist), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, 
				null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			insane_frames_downtoup = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, - 0.7f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1.2f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1.5f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 4.5f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 3.5f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 0.2f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1.3f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 3, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 2, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 3.3f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1.6f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 0.3f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			insane_frames_jumpdown = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0.2f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 11.5f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 5.1f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 7.1f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			insane_frames_down = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1.7f, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 1.6f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, insane_fist), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, insane_moan), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new 
				mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0.5f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, - 0.2f, insane_scream), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0.2f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0.4f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0.6f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0.8f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0.7f, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, insane_checkup)};
			insane_frames_walk_normal = new mframe_t[]{new mframe_t(GameAI.ai_walk_Renamed_Field, 0, insane_scream), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.5f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 3.5f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 1.7f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.3f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.4f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.2f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 4.2f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 5.6f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 3.3f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.4f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0.9f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0, null)};
			insane_frames_walk_insane = new mframe_t[]{new mframe_t(GameAI.ai_walk_Renamed_Field, 0, insane_scream), new mframe_t(GameAI.ai_walk_Renamed_Field, 3.4f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 3.6f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.9f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.2f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.6f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0.7f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 4.8f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 5.3f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 1.1f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0.5f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 4.9f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 6.7f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 3.8f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0.2f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 3.4f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 6.4f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 5, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 1.8f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0, null)};
			insane_frames_stand_pain = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			insane_frames_stand_death = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			insane_frames_crawl = new mframe_t[]{new mframe_t(GameAI.ai_walk_Renamed_Field, 0, insane_scream), new mframe_t(GameAI.ai_walk_Renamed_Field, 1.5f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.1f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 3.6f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 0.9f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 3f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 3.4f, null), new mframe_t(GameAI.ai_walk_Renamed_Field, 2.4f, null)};
			insane_frames_crawl_pain = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			insane_frames_crawl_death = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			insane_frames_cross = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, insane_moan), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
			insane_frames_struggle_cross = new mframe_t[]{new mframe_t(GameAI.ai_move_Renamed_Field, 0, insane_scream), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null), new mframe_t(GameAI.ai_move_Renamed_Field, 0, null)};
		}
		//	This file generated by ModelGen - Do NOT Modify
		
		public const int FRAME_stand1 = 0;
		
		public const int FRAME_stand2 = 1;
		
		public const int FRAME_stand3 = 2;
		
		public const int FRAME_stand4 = 3;
		
		public const int FRAME_stand5 = 4;
		
		public const int FRAME_stand6 = 5;
		
		public const int FRAME_stand7 = 6;
		
		public const int FRAME_stand8 = 7;
		
		public const int FRAME_stand9 = 8;
		
		public const int FRAME_stand10 = 9;
		
		public const int FRAME_stand11 = 10;
		
		public const int FRAME_stand12 = 11;
		
		public const int FRAME_stand13 = 12;
		
		public const int FRAME_stand14 = 13;
		
		public const int FRAME_stand15 = 14;
		
		public const int FRAME_stand16 = 15;
		
		public const int FRAME_stand17 = 16;
		
		public const int FRAME_stand18 = 17;
		
		public const int FRAME_stand19 = 18;
		
		public const int FRAME_stand20 = 19;
		
		public const int FRAME_stand21 = 20;
		
		public const int FRAME_stand22 = 21;
		
		public const int FRAME_stand23 = 22;
		
		public const int FRAME_stand24 = 23;
		
		public const int FRAME_stand25 = 24;
		
		public const int FRAME_stand26 = 25;
		
		public const int FRAME_stand27 = 26;
		
		public const int FRAME_stand28 = 27;
		
		public const int FRAME_stand29 = 28;
		
		public const int FRAME_stand30 = 29;
		
		public const int FRAME_stand31 = 30;
		
		public const int FRAME_stand32 = 31;
		
		public const int FRAME_stand33 = 32;
		
		public const int FRAME_stand34 = 33;
		
		public const int FRAME_stand35 = 34;
		
		public const int FRAME_stand36 = 35;
		
		public const int FRAME_stand37 = 36;
		
		public const int FRAME_stand38 = 37;
		
		public const int FRAME_stand39 = 38;
		
		public const int FRAME_stand40 = 39;
		
		public const int FRAME_stand41 = 40;
		
		public const int FRAME_stand42 = 41;
		
		public const int FRAME_stand43 = 42;
		
		public const int FRAME_stand44 = 43;
		
		public const int FRAME_stand45 = 44;
		
		public const int FRAME_stand46 = 45;
		
		public const int FRAME_stand47 = 46;
		
		public const int FRAME_stand48 = 47;
		
		public const int FRAME_stand49 = 48;
		
		public const int FRAME_stand50 = 49;
		
		public const int FRAME_stand51 = 50;
		
		public const int FRAME_stand52 = 51;
		
		public const int FRAME_stand53 = 52;
		
		public const int FRAME_stand54 = 53;
		
		public const int FRAME_stand55 = 54;
		
		public const int FRAME_stand56 = 55;
		
		public const int FRAME_stand57 = 56;
		
		public const int FRAME_stand58 = 57;
		
		public const int FRAME_stand59 = 58;
		
		public const int FRAME_stand60 = 59;
		
		public const int FRAME_stand61 = 60;
		
		public const int FRAME_stand62 = 61;
		
		public const int FRAME_stand63 = 62;
		
		public const int FRAME_stand64 = 63;
		
		public const int FRAME_stand65 = 64;
		
		public const int FRAME_stand66 = 65;
		
		public const int FRAME_stand67 = 66;
		
		public const int FRAME_stand68 = 67;
		
		public const int FRAME_stand69 = 68;
		
		public const int FRAME_stand70 = 69;
		
		public const int FRAME_stand71 = 70;
		
		public const int FRAME_stand72 = 71;
		
		public const int FRAME_stand73 = 72;
		
		public const int FRAME_stand74 = 73;
		
		public const int FRAME_stand75 = 74;
		
		public const int FRAME_stand76 = 75;
		
		public const int FRAME_stand77 = 76;
		
		public const int FRAME_stand78 = 77;
		
		public const int FRAME_stand79 = 78;
		
		public const int FRAME_stand80 = 79;
		
		public const int FRAME_stand81 = 80;
		
		public const int FRAME_stand82 = 81;
		
		public const int FRAME_stand83 = 82;
		
		public const int FRAME_stand84 = 83;
		
		public const int FRAME_stand85 = 84;
		
		public const int FRAME_stand86 = 85;
		
		public const int FRAME_stand87 = 86;
		
		public const int FRAME_stand88 = 87;
		
		public const int FRAME_stand89 = 88;
		
		public const int FRAME_stand90 = 89;
		
		public const int FRAME_stand91 = 90;
		
		public const int FRAME_stand92 = 91;
		
		public const int FRAME_stand93 = 92;
		
		public const int FRAME_stand94 = 93;
		
		public const int FRAME_stand95 = 94;
		
		public const int FRAME_stand96 = 95;
		
		public const int FRAME_stand97 = 96;
		
		public const int FRAME_stand98 = 97;
		
		public const int FRAME_stand99 = 98;
		
		public const int FRAME_stand100 = 99;
		
		public const int FRAME_stand101 = 100;
		
		public const int FRAME_stand102 = 101;
		
		public const int FRAME_stand103 = 102;
		
		public const int FRAME_stand104 = 103;
		
		public const int FRAME_stand105 = 104;
		
		public const int FRAME_stand106 = 105;
		
		public const int FRAME_stand107 = 106;
		
		public const int FRAME_stand108 = 107;
		
		public const int FRAME_stand109 = 108;
		
		public const int FRAME_stand110 = 109;
		
		public const int FRAME_stand111 = 110;
		
		public const int FRAME_stand112 = 111;
		
		public const int FRAME_stand113 = 112;
		
		public const int FRAME_stand114 = 113;
		
		public const int FRAME_stand115 = 114;
		
		public const int FRAME_stand116 = 115;
		
		public const int FRAME_stand117 = 116;
		
		public const int FRAME_stand118 = 117;
		
		public const int FRAME_stand119 = 118;
		
		public const int FRAME_stand120 = 119;
		
		public const int FRAME_stand121 = 120;
		
		public const int FRAME_stand122 = 121;
		
		public const int FRAME_stand123 = 122;
		
		public const int FRAME_stand124 = 123;
		
		public const int FRAME_stand125 = 124;
		
		public const int FRAME_stand126 = 125;
		
		public const int FRAME_stand127 = 126;
		
		public const int FRAME_stand128 = 127;
		
		public const int FRAME_stand129 = 128;
		
		public const int FRAME_stand130 = 129;
		
		public const int FRAME_stand131 = 130;
		
		public const int FRAME_stand132 = 131;
		
		public const int FRAME_stand133 = 132;
		
		public const int FRAME_stand134 = 133;
		
		public const int FRAME_stand135 = 134;
		
		public const int FRAME_stand136 = 135;
		
		public const int FRAME_stand137 = 136;
		
		public const int FRAME_stand138 = 137;
		
		public const int FRAME_stand139 = 138;
		
		public const int FRAME_stand140 = 139;
		
		public const int FRAME_stand141 = 140;
		
		public const int FRAME_stand142 = 141;
		
		public const int FRAME_stand143 = 142;
		
		public const int FRAME_stand144 = 143;
		
		public const int FRAME_stand145 = 144;
		
		public const int FRAME_stand146 = 145;
		
		public const int FRAME_stand147 = 146;
		
		public const int FRAME_stand148 = 147;
		
		public const int FRAME_stand149 = 148;
		
		public const int FRAME_stand150 = 149;
		
		public const int FRAME_stand151 = 150;
		
		public const int FRAME_stand152 = 151;
		
		public const int FRAME_stand153 = 152;
		
		public const int FRAME_stand154 = 153;
		
		public const int FRAME_stand155 = 154;
		
		public const int FRAME_stand156 = 155;
		
		public const int FRAME_stand157 = 156;
		
		public const int FRAME_stand158 = 157;
		
		public const int FRAME_stand159 = 158;
		
		public const int FRAME_stand160 = 159;
		
		public const int FRAME_walk27 = 160;
		
		public const int FRAME_walk28 = 161;
		
		public const int FRAME_walk29 = 162;
		
		public const int FRAME_walk30 = 163;
		
		public const int FRAME_walk31 = 164;
		
		public const int FRAME_walk32 = 165;
		
		public const int FRAME_walk33 = 166;
		
		public const int FRAME_walk34 = 167;
		
		public const int FRAME_walk35 = 168;
		
		public const int FRAME_walk36 = 169;
		
		public const int FRAME_walk37 = 170;
		
		public const int FRAME_walk38 = 171;
		
		public const int FRAME_walk39 = 172;
		
		public const int FRAME_walk1 = 173;
		
		public const int FRAME_walk2 = 174;
		
		public const int FRAME_walk3 = 175;
		
		public const int FRAME_walk4 = 176;
		
		public const int FRAME_walk5 = 177;
		
		public const int FRAME_walk6 = 178;
		
		public const int FRAME_walk7 = 179;
		
		public const int FRAME_walk8 = 180;
		
		public const int FRAME_walk9 = 181;
		
		public const int FRAME_walk10 = 182;
		
		public const int FRAME_walk11 = 183;
		
		public const int FRAME_walk12 = 184;
		
		public const int FRAME_walk13 = 185;
		
		public const int FRAME_walk14 = 186;
		
		public const int FRAME_walk15 = 187;
		
		public const int FRAME_walk16 = 188;
		
		public const int FRAME_walk17 = 189;
		
		public const int FRAME_walk18 = 190;
		
		public const int FRAME_walk19 = 191;
		
		public const int FRAME_walk20 = 192;
		
		public const int FRAME_walk21 = 193;
		
		public const int FRAME_walk22 = 194;
		
		public const int FRAME_walk23 = 195;
		
		public const int FRAME_walk24 = 196;
		
		public const int FRAME_walk25 = 197;
		
		public const int FRAME_walk26 = 198;
		
		public const int FRAME_st_pain2 = 199;
		
		public const int FRAME_st_pain3 = 200;
		
		public const int FRAME_st_pain4 = 201;
		
		public const int FRAME_st_pain5 = 202;
		
		public const int FRAME_st_pain6 = 203;
		
		public const int FRAME_st_pain7 = 204;
		
		public const int FRAME_st_pain8 = 205;
		
		public const int FRAME_st_pain9 = 206;
		
		public const int FRAME_st_pain10 = 207;
		
		public const int FRAME_st_pain11 = 208;
		
		public const int FRAME_st_pain12 = 209;
		
		public const int FRAME_st_death2 = 210;
		
		public const int FRAME_st_death3 = 211;
		
		public const int FRAME_st_death4 = 212;
		
		public const int FRAME_st_death5 = 213;
		
		public const int FRAME_st_death6 = 214;
		
		public const int FRAME_st_death7 = 215;
		
		public const int FRAME_st_death8 = 216;
		
		public const int FRAME_st_death9 = 217;
		
		public const int FRAME_st_death10 = 218;
		
		public const int FRAME_st_death11 = 219;
		
		public const int FRAME_st_death12 = 220;
		
		public const int FRAME_st_death13 = 221;
		
		public const int FRAME_st_death14 = 222;
		
		public const int FRAME_st_death15 = 223;
		
		public const int FRAME_st_death16 = 224;
		
		public const int FRAME_st_death17 = 225;
		
		public const int FRAME_st_death18 = 226;
		
		public const int FRAME_crawl1 = 227;
		
		public const int FRAME_crawl2 = 228;
		
		public const int FRAME_crawl3 = 229;
		
		public const int FRAME_crawl4 = 230;
		
		public const int FRAME_crawl5 = 231;
		
		public const int FRAME_crawl6 = 232;
		
		public const int FRAME_crawl7 = 233;
		
		public const int FRAME_crawl8 = 234;
		
		public const int FRAME_crawl9 = 235;
		
		public const int FRAME_cr_pain2 = 236;
		
		public const int FRAME_cr_pain3 = 237;
		
		public const int FRAME_cr_pain4 = 238;
		
		public const int FRAME_cr_pain5 = 239;
		
		public const int FRAME_cr_pain6 = 240;
		
		public const int FRAME_cr_pain7 = 241;
		
		public const int FRAME_cr_pain8 = 242;
		
		public const int FRAME_cr_pain9 = 243;
		
		public const int FRAME_cr_pain10 = 244;
		
		public const int FRAME_cr_death10 = 245;
		
		public const int FRAME_cr_death11 = 246;
		
		public const int FRAME_cr_death12 = 247;
		
		public const int FRAME_cr_death13 = 248;
		
		public const int FRAME_cr_death14 = 249;
		
		public const int FRAME_cr_death15 = 250;
		
		public const int FRAME_cr_death16 = 251;
		
		public const int FRAME_cross1 = 252;
		
		public const int FRAME_cross2 = 253;
		
		public const int FRAME_cross3 = 254;
		
		public const int FRAME_cross4 = 255;
		
		public const int FRAME_cross5 = 256;
		
		public const int FRAME_cross6 = 257;
		
		public const int FRAME_cross7 = 258;
		
		public const int FRAME_cross8 = 259;
		
		public const int FRAME_cross9 = 260;
		
		public const int FRAME_cross10 = 261;
		
		public const int FRAME_cross11 = 262;
		
		public const int FRAME_cross12 = 263;
		
		public const int FRAME_cross13 = 264;
		
		public const int FRAME_cross14 = 265;
		
		public const int FRAME_cross15 = 266;
		
		public const int FRAME_cross16 = 267;
		
		public const int FRAME_cross17 = 268;
		
		public const int FRAME_cross18 = 269;
		
		public const int FRAME_cross19 = 270;
		
		public const int FRAME_cross20 = 271;
		
		public const int FRAME_cross21 = 272;
		
		public const int FRAME_cross22 = 273;
		
		public const int FRAME_cross23 = 274;
		
		public const int FRAME_cross24 = 275;
		
		public const int FRAME_cross25 = 276;
		
		public const int FRAME_cross26 = 277;
		
		public const int FRAME_cross27 = 278;
		
		public const int FRAME_cross28 = 279;
		
		public const int FRAME_cross29 = 280;
		
		public const int FRAME_cross30 = 281;
		
		public const float MODEL_SCALE = 1.000000f;
		
		internal static int sound_fist;
		
		internal static int sound_shake;
		
		internal static int sound_moan;
		
		internal static int[] sound_scream = new int[]{0, 0, 0, 0, 0, 0, 0, 0};
		
		//UPGRADE_NOTE: The initialization of  'insane_fist' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_fist;
		
		//UPGRADE_NOTE: The initialization of  'insane_shake' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_shake;
		
		//UPGRADE_NOTE: The initialization of  'insane_moan' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_moan;
		
		//UPGRADE_NOTE: The initialization of  'insane_scream' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_scream;
		
		//UPGRADE_NOTE: The initialization of  'insane_cross' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_cross;
		
		//UPGRADE_NOTE: The initialization of  'insane_walk' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_walk;
		
		//UPGRADE_NOTE: The initialization of  'insane_run' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_run;
		
		//UPGRADE_NOTE: The initialization of  'insane_pain' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntPainAdapter insane_pain;
		
		//UPGRADE_NOTE: The initialization of  'insane_onground' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_onground;
		
		//UPGRADE_NOTE: The initialization of  'insane_checkdown' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_checkdown;
		
		//UPGRADE_NOTE: The initialization of  'insane_checkup' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_checkup;
		
		//UPGRADE_NOTE: The initialization of  'insane_stand' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_stand;
		
		//UPGRADE_NOTE: The initialization of  'insane_dead' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntThinkAdapter insane_dead;
		
		//UPGRADE_NOTE: The initialization of  'insane_die' was moved to static method 'jake2.game.monsters.M_Insane'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static EntDieAdapter insane_die;
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_stand_normal' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_stand_normal;
		
		internal static mmove_t insane_move_stand_normal = new mmove_t(FRAME_stand60, FRAME_stand65, insane_frames_stand_normal, insane_stand);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_stand_insane' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_stand_insane;
		
		internal static mmove_t insane_move_stand_insane = new mmove_t(FRAME_stand65, FRAME_stand94, insane_frames_stand_insane, insane_stand);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_uptodown' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_uptodown;
		
		internal static mmove_t insane_move_uptodown = new mmove_t(FRAME_stand1, FRAME_stand40, insane_frames_uptodown, insane_onground);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_downtoup' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_downtoup;
		
		internal static mmove_t insane_move_downtoup = new mmove_t(FRAME_stand41, FRAME_stand59, insane_frames_downtoup, insane_stand);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_jumpdown' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_jumpdown;
		
		internal static mmove_t insane_move_jumpdown = new mmove_t(FRAME_stand96, FRAME_stand100, insane_frames_jumpdown, insane_onground);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_down' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_down;
		
		internal static mmove_t insane_move_down = new mmove_t(FRAME_stand100, FRAME_stand160, insane_frames_down, insane_onground);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_walk_normal' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_walk_normal;
		
		internal static mmove_t insane_move_walk_normal = new mmove_t(FRAME_walk27, FRAME_walk39, insane_frames_walk_normal, insane_walk);
		
		internal static mmove_t insane_move_run_normal = new mmove_t(FRAME_walk27, FRAME_walk39, insane_frames_walk_normal, insane_run);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_walk_insane' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_walk_insane;
		
		internal static mmove_t insane_move_walk_insane = new mmove_t(FRAME_walk1, FRAME_walk26, insane_frames_walk_insane, insane_walk);
		
		internal static mmove_t insane_move_run_insane = new mmove_t(FRAME_walk1, FRAME_walk26, insane_frames_walk_insane, insane_run);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_stand_pain' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_stand_pain;
		
		internal static mmove_t insane_move_stand_pain = new mmove_t(FRAME_st_pain2, FRAME_st_pain12, insane_frames_stand_pain, insane_run);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_stand_death' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_stand_death;
		
		internal static mmove_t insane_move_stand_death = new mmove_t(FRAME_st_death2, FRAME_st_death18, insane_frames_stand_death, insane_dead);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_crawl' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_crawl;
		
		internal static mmove_t insane_move_crawl = new mmove_t(FRAME_crawl1, FRAME_crawl9, insane_frames_crawl, null);
		
		internal static mmove_t insane_move_runcrawl = new mmove_t(FRAME_crawl1, FRAME_crawl9, insane_frames_crawl, null);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_crawl_pain' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_crawl_pain;
		
		internal static mmove_t insane_move_crawl_pain = new mmove_t(FRAME_cr_pain2, FRAME_cr_pain10, insane_frames_crawl_pain, insane_run);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_crawl_death' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_crawl_death;
		
		internal static mmove_t insane_move_crawl_death = new mmove_t(FRAME_cr_death10, FRAME_cr_death16, insane_frames_crawl_death, insane_dead);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_cross' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_cross;
		
		internal static mmove_t insane_move_cross = new mmove_t(FRAME_cross1, FRAME_cross15, insane_frames_cross, insane_cross);
		
		//UPGRADE_NOTE: The initialization of  'insane_frames_struggle_cross' was moved to method 'InitBlock'. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1005'"
		internal static mframe_t[] insane_frames_struggle_cross;
		
		internal static mmove_t insane_move_struggle_cross = new mmove_t(FRAME_cross16, FRAME_cross30, insane_frames_struggle_cross, insane_cross);
		
		/*
		* QUAKED misc_insane (1 .5 0) (-16 -16 -24) (16 16 32) Ambush Trigger_Spawn
		* CRAWL CRUCIFIED STAND_GROUND ALWAYS_STAND
		*/
		public static void  SP_misc_insane(edict_t self)
		{
			//	 static int skin = 0; //@@
			
			if (GameBase.deathmatch.value_Renamed != 0)
			{
				GameUtil.G_FreeEdict(self);
				return ;
			}
			
			sound_fist = GameBase.gi.soundindex("insane/insane11.wav");
			sound_shake = GameBase.gi.soundindex("insane/insane5.wav");
			sound_moan = GameBase.gi.soundindex("insane/insane7.wav");
			sound_scream[0] = GameBase.gi.soundindex("insane/insane1.wav");
			sound_scream[1] = GameBase.gi.soundindex("insane/insane2.wav");
			sound_scream[2] = GameBase.gi.soundindex("insane/insane3.wav");
			sound_scream[3] = GameBase.gi.soundindex("insane/insane4.wav");
			sound_scream[4] = GameBase.gi.soundindex("insane/insane6.wav");
			sound_scream[5] = GameBase.gi.soundindex("insane/insane8.wav");
			sound_scream[6] = GameBase.gi.soundindex("insane/insane9.wav");
			sound_scream[7] = GameBase.gi.soundindex("insane/insane10.wav");
			
			self.movetype = Defines.MOVETYPE_STEP;
			self.solid = Defines.SOLID_BBOX;
			self.s.modelindex = GameBase.gi.modelindex("models/monsters/insane/tris.md2");
			
			Math3D.VectorSet(self.mins, - 16, - 16, - 24);
			Math3D.VectorSet(self.maxs, 16, 16, 32);
			
			self.health = 100;
			self.gib_health = - 50;
			self.mass = 300;
			
			self.pain = insane_pain;
			self.die = insane_die;
			
			self.monsterinfo.stand = insane_stand;
			self.monsterinfo.walk = insane_walk;
			self.monsterinfo.run = insane_run;
			self.monsterinfo.dodge = null;
			self.monsterinfo.attack = null;
			self.monsterinfo.melee = null;
			self.monsterinfo.sight = null;
			self.monsterinfo.aiflags |= Defines.AI_GOOD_GUY;
			
			// @@
			//	 self.s.skinnum = skin;
			//	 skin++;
			//	 if (skin > 12)
			//		 skin = 0;
			
			GameBase.gi.linkentity(self);
			
			if ((self.spawnflags & 16) != 0)
			// Stand Ground
				self.monsterinfo.aiflags |= Defines.AI_STAND_GROUND;
			
			self.monsterinfo.currentmove = insane_move_stand_normal;
			
			self.monsterinfo.scale = MODEL_SCALE;
			if ((self.spawnflags & 8) != 0)
			// Crucified ?
			{
				Math3D.VectorSet(self.mins, - 16, 0, 0);
				Math3D.VectorSet(self.maxs, 16, 8, 32);
				self.flags |= Defines.FL_NO_KNOCKBACK;
				GameAI.flymonster_start.think(self);
			}
			else
			{
				GameAI.walkmonster_start.think(self);
				self.s.skinnum = Lib.rand() % 3;
			}
		}
		static M_Insane()
		{
			insane_fist = new AnonymousClassEntThinkAdapter();
			insane_shake = new AnonymousClassEntThinkAdapter1();
			insane_moan = new AnonymousClassEntThinkAdapter2();
			insane_scream = new AnonymousClassEntThinkAdapter3();
			insane_cross = new AnonymousClassEntThinkAdapter4();
			insane_walk = new AnonymousClassEntThinkAdapter5();
			insane_run = new AnonymousClassEntThinkAdapter6();
			insane_pain = new AnonymousClassEntPainAdapter();
			insane_onground = new AnonymousClassEntThinkAdapter7();
			insane_checkdown = new AnonymousClassEntThinkAdapter8();
			insane_checkup = new AnonymousClassEntThinkAdapter9();
			insane_stand = new AnonymousClassEntThinkAdapter10();
			insane_dead = new AnonymousClassEntThinkAdapter11();
			insane_die = new AnonymousClassEntDieAdapter();
		}
	}
}